#include <stdio.h>
#include <iostream>
#include <iostream>
#include "SelectServer.hpp"
#include "MyPthread/Log.hpp"


using namespace std;
using namespace LogModule;

int main(int argc, char* argv[])
{
    if(argc!= 2)
    {
        cout << "Usage: " << argv[0] << " port" << endl;
        Die(1);
    }
    int port = atoi(argv[1]);
    SelectServer::SelectServer selectServer(port);
    selectServer.Init();
    LOG(LogLevel::INFO)<< "Server start at port: " << port;
    selectServer.Loop();


    return 0;
}